import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 大小写不敏感
 * 日期 2022/5/5 9:28
 * 创建者：john driver
 */
public class CaseInsensitive {
    public static void main(String[] args) {
        //Pattern pattern = Pattern.compile("a((?i)b)cd");
        //Pattern pattern = Pattern.compile("abcd",Pattern.CASE_INSENSITIVE);
        Pattern pattern = Pattern.compile("abcd",2);
        Matcher m = pattern.matcher("abcdefaBcd");
        while (m.find()){
            System.out.println(m.group(0));
        }
    }
}
